<div class="panel panel-info">
    <div class="panel-heading">
        <h3 class="panel-title">订单管理</h3>
    </div>
    <div class="well">
        <form class="form-inline" role="form">
        <div class="form-group">
            <label class="control-label" for="name">订单号</label>
            <input type="text" class="form-control" id="order_number" name="order_number" value="<?php echo $order_number?>"
                   placeholder="请输入订单号">
        </div>
        <button type="submit" class="btn btn-info"> 查询</button>
    </form>
    </div>
    <div class="panel-body">
        <table class="table table-condensed table-striped">
            <thead>
            <tr>
                <th><input type="checkbox" class="rows_check" /> </th>
                <th>编号</th>
                <th>订单号</th>
                <th>订单总金额</th>
                <th>订单状态</th>
                <th>用户名</th>
                <th>邮箱</th>
                <th>订单下单时间</th>
                <th>订单付款时间</th>
                <th>订单发货时间</th>
                <th>订单完成时间</th>
                <th>订单取消时间</th>
                <th>订单支付方式</th>
                <th>订单支付类型</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
                <?php if(isset($order_list['rows'])):?>
                <?php foreach($order_list['rows'] as $key=>$list):?>
                <tr>
                    <td><input type="checkbox" class="row_check" data-id="<?php echo $list['id'] ?>" /></td>
                    <td><?php echo $key+1 ?></td>
                    <td><?php echo $list['order_number'] ?></td>
                    <td><?php echo $list['order_total'] ?></td>
                    <td><?php echo $list['order_state_name'] ?></td>
                    <td><?php echo $list['user_name'] ?></td>
                    <td><?php echo $list['user_email'] ?></td>
                    <td><?php echo date("Y-m-d H:i:s", $list['createdon']);?></td>
                    <td><?php if(!empty($list['processing_time'])):?><?php echo  date("Y-m-d H:i:s", $list['processing_time']);?><?php endif;?></td>
                    <td><?php if(!empty($list['delivery_time'])):?><?php echo  date("Y-m-d H:i:s", $list['delivery_time']);?><?php endif;?></td>
                    <td><?php if(!empty($list['complete_time'])):?><?php echo  date("Y-m-d H:i:s", $list['complete_time']);?><?php endif;?></td>
                    <td><?php if(!empty($list['canceltime'])):?><?php echo  date("Y-m-d H:i:s", $list['canceltime']);?><?php endif;?></td>
                    <td><?php echo $list['payment_method'] ?></td>
                    <td><?php echo $list['payment_method_datail'] ?></td>
                    <td>
                        <?php if(!empty($userlimit['edit'])&&$userlimit['edit']=="1"):?>
                        <a type="button" class="btn btn-primary" href="/order/view?order_number=<?php echo $list['order_number']?>">
                            查看
                        </a>
                        <?php endif;?>
                    </td>
                </tr>
                <?php endforeach; ?>
            <?php endif;?>
            </tbody>
        </table>
        <?php if($pages>1):?>
            <div class="well well-sm" style="text-align: center"><?php echo HTML::getPageHtml($page,$pages,"/user/list?order_number=".$order_number)?></div>
        <?php endif;?>
    </div>
</div>
<div class="modal fade" id="list_modal" tabindex="-1" role="dialog" model="User"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                   用户信息
                </h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form" id="list_form" name="list_form">
                    <div class="form-group">
                        <input type="hidden" class="form-control" id="model_id" name="model_id" />
                    </div>
                    <div class="form-group">
                        <label for="username" class="col-sm-2 control-label">名字</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="username" name="username"
                                   placeholder="请输入名字">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-sm-2 control-label">邮箱</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="email" name="email"
                                   placeholder="请输入邮箱">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-sm-2 control-label">性别</label>
                        <div class="col-sm-10">
                            <select name="sex" id="sex"  class="form-control">
                                <option value="1">男</option>
                                <option value="0">女</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-sm-2 control-label">年龄</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="age" name="age"  />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="remark" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" rows="2" id="remark" name="remark"></textarea>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">关闭
                </button>
                <button type="button" id="saveForm" class="btn btn-primary">
                    保存
                </button>
            </div>
        </div>
    </div>
  </div>

